
import random
import unittest
import ConfigParser

import sys
sys.path.append('..')

from lib.Quote import Quote
from datetime import datetime

class QuoteTest(unittest.TestCase):

    def test_createquote(self):
        timestamp = datetime.utcnow()
        quote = Quote(1, 3.14, 1, 10, 123, timestamp)
        
        self.assertIsNotNone(quote)
        self.assertEqual(quote.size     ,         1)        
        self.assertEqual(quote.price    ,      3.14)
        self.assertEqual(quote.side     ,         1)
        self.assertEqual(quote.contract ,        10)  
        self.assertEqual(quote.position ,       123)
        self.assertEqual(quote.timestamp, timestamp) 
    

if __name__ == '__main__':
    unittest.main()